<template>
  <div>
    <Navbar appTitle="测试2" />
    <Examine
      type="0"
      ref="Examine"
      @submitProcess="submitProcess"
      id="ERP_SHIPPING_APPLY"
      @getUserState="getUserState"
      :key="index"
    />
    <!-- <Examine type="2" id="1457524" /> -->
    <!-- <div @click="submitProcess">submitProcess</div> -->
    <!-- <scanInput :columns="columns" @changeScan="changeScan" /> -->
    <div @click="indexChange">1</div>
  </div>
</template>

<script>
import Examine from "@/components/examine";
import Navbar from "@/components/navBar/navBar_right";
export default {
  name: "Analysis",
  components: {
    Examine,
    Navbar,
    scanInput: () => import("@/components/scanCode/scanInput"),
  },
  data() {
    return {
      index: 1,
      selectShow: false,
      columns: [
        {
          key: "测试1",
          value: "1",
        },
        {
          key: "测试2",
          value: "2",
        },
        {
          key: "测试3",
          value: "3",
        },
        {
          key: "测试4",
          value: "4",
        },
      ],
    };
  },
  created() {},
  methods: {
    indexChange() {
      this.index += 1;
    },
    // 获取流程数据
    submitProcess(e) {
      console.log(e, "eee");
      if (e.nodeDtos && e.nodeDtos.length > 0) {
        console.log(e);
      } else {
        this.$refs.Examine.confirm();
      }
    },
    // 监听选人组件的弹窗是否开启
    getUserState(v) {
      this.selectShow = v;//true代表选人组件已经开启，调用this.$refs.Examine.closePicker()方法使选人组件弹窗关闭
    },
    // 获取扫码组件数据
    changeScan(v) {
      console.log(v, "获取扫码组件数据");
      //value是下拉选择后值,code是扫码获得的值，根据qrcode判断是否隐藏当前页面只显示相机页
    },
  },
};
</script>
<style lang="scss" scoped>
.wrap {
  height: 100vh;
  overflow-y: scroll;
}
</style>